home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 8471 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  6.5 KB

  1. Path: watnews.watson.ibm.com!ncohen
  2. From: ncohen@watson.ibm.com (Norman H. Cohen)
  3. Newsgroups: comp.lang.ada,comp.lang.c
  4. Subject: Re: C/C++ knocks the crap out of Ada
  5. Date: 4 Mar 1996 16:03:17 GMT
  6. Organization: IBM T.J. Watson Research Center
  7. Distribution: world
  8. Message-ID: <4hf485$1mgv@watnews1.watson.ibm.com>
  9. References: <JSA.96Feb16135027@organon.com> <4gaa6l$8mk@post.gsfc.nasa.gov>
  10.  <4gd94r$isu@mack.rt66.com> <1996Feb22.005518.13396@leeweyr.sccsi.com>
  11.  <4gvrffINNlqo@anvil.ugrad.cs.ubc.ca>
  12.  <4h4j31$1ga3@watnews1.watson.ibm.com> <TANMOY.96Feb29144112@qcd.lanl.gov>
  13. Reply-To: ncohen@watson.ibm.com
  14. NNTP-Posting-Host: rios8.watson.ibm.com
  15.  
  16. In article <TANMOY.96Feb29144112@qcd.lanl.gov>, tanmoy@qcd.lanl.gov
  17. (Tanmoy Bhattacharya) writes: 
  18.  
  19. |> Oh what the heck! Once in a lifetime is not that bad: let me make just
  20. |> a single post in the language war debate.
  21.  
  22. Famous last words!  That's how we all started out! :-)
  23.  
  24. You make much of the fact that C is far more widely used than Ada,
  25. gleefully repeating that point several times.  However, that was never a
  26. point of contention.  You conjecture that if Ada were more popular, more
  27. nonstandard dialects would have arisen.  Maybe, but I doubt it.  As you
  28. point out, the Ada standard came before the language began to be used,
  29. and provided a clear definition of what it means to be an implementation
  30. of Ada.  This definition allows plenty of variation among
  31. implementations, but only in carefully prescribed ways; in contrast, the
  32. ANSI C standard came out only after several incompatible versions of the
  33. language were in wide use, and now you're faced with the problem of
  34. putting the genie back in the bottle.
  35.  
  36. |> Today, the international community is agreed on a definition of
  37. |> C. Free ANSI C compilers are available (e.g. gcc with the -pedantic
  38. |> flag). Vendors are moving towards providing ANSI C as their main
  39. |> compiler. Specialized applications (supercomputers etc.) are also
  40. |> moving towards ANSI C as the base language over which to provide
  41. |> needed extensions. Things will change, and one should think of ANSI C
  42. |> as the only language that deserves to be called C anymore.
  43.  
  44. You'd better tell that to Bill Gates.
  45.  
  46. |>                                             I would rather use an ugly
  47. |> language that grew out of standardizing the true needs of the
  48. |> programming community, than one designed by fiat by any single
  49. |> committee: and, I am firm in my belief that most often I will be
  50. |> correct in my choice.
  51.  
  52. The Ada language was originally designed in response to a set of
  53. requirements promulgated by its intended users.  The revision was driven
  54. by requirements that arose in the programming community, which provided
  55. plentiful input to a very open process.
  56.  
  57. |> NHC: The culture in the Ada community is quite different.  The need to pass a
  58. |>
  59. |> A minuscule community can have a well defined culture. A large and
  60. |> varied community cannot.
  61.  
  62. I don't think the difference is in the size of the communities, but in
  63. the nature of the languages.  Ada is designed specifically to facilitate
  64. disciplined software engineering.  One cannot understand the proper use
  65. of Ada features without understanding data abstraction, encapsulation,
  66. and narrow, precisely defined interfaces.  Therefore, these fundamental
  67. concepts are taught along with Ada.  C can also be used in a disciplined
  68. way, of course, but the language design does not focus on this; rather,
  69. it focuses on ensuring microefficiency, it invites programming by side
  70. effect, and it glorifies the use of obscure notation.
  71.  
  72. |> NHC: rigorous validation suite to be approved for use on U.S. Department of
  73. |> NHC: Defense projects, and the requirement in the standard itself to reject
  74. |> NHC: certain forms of nonconformance at compile time, have led compiler
  75. |>
  76. |> So does the C standard.
  77. |>
  78. |> NHC: writers to implement the standard strictly and consistently.
  79.  
  80. Incorrect.  (And please stop cutting me off in mid-sentence! :-)) The C
  81. standard contains to requirement to detect any form of nonconformance at
  82. compile time.  Section 1.7 of the standard states, "A _conforming_hosted_
  83. _implementation_ shall accept any strictly conforming program.  A
  84. _conforming_freestanding_implementation_ shall accept any strictly
  85. conforming program in which the use of the features specified in the
  86. library section (Section 4) is confined to the contents of the standard
  87. <float.h>, <limits.h>, <stdarg.h>, and <stddef.h>." The converse ("A
  88. conforming implementation shall reject any program that is not strictly
  89. conforming.") is noticeably absent.  Indeed, the paragraph continues, "A
  90. conforming implementation may have extensions (including additional
  91. library functions), provided they do not alter the behavior of any
  92. strictly conforming program."
  93.  
  94. |> No. What has lead to consistency is the small number of users with
  95. |> homogeneous needs.
  96.  
  97. The needs of the Ada community are hardly homogeneous.  Ada is
  98. implemented on a wide variety of processors, from supercomputers to
  99. embedded microprocessors and everything in between.  It is used for
  100. applications as varied as finance, command and control, systems
  101. programming, computer-aided design, VLSI design, medical instrumentation,
  102. and virtual reality, among others.
  103.  
  104. |> NHC: To the extent that Ada compiler writers have sensed the need for
  105. |> NHC: extensions, these extensions have been in the form of "changeable parts"
  106. |> NHC: anticipated by the standard--implementation-defined attributes, pragmas,
  107. |> NHC: and packages.  Many of these implementation variations--for exmaple,
  108. |>
  109. |> One can do that when the standard can anticipate the required
  110. |> attributes. Did the ADA standard anticipate the need to specify how to
  111. |> distribute an array over 1024 nodes of a machine? In a multithreaded
  112. |> environment, did they anticipate how to specify which thread runs on
  113. |> which node? Maybe they did, because the standard is recent, but have
  114. |> they anticipated the next machine architecture to come along?
  115.  
  116. The hooks to do this (implementation-defined pragmas) are in the language
  117. and defined in general enough terms to accommodate future architectures.
  118. Such pragmas are not portable from one implementation to another, but
  119. they are consistent with the standard.  The Ada 95 revision codified
  120. existing practice by standardizing certain implementation-defined
  121. approaches that were of general use.  Later revisions will, no doubt, do
  122. the same.  In the mean time, the ISO working group on Ada, WG9, and its
  123. Uniformity Rapporteur Group (URG), work to develop and recommend common
  124. approaches and, where appropriate, to institute secondary standards.
  125.  
  126. --
  127. Norman H. Cohen    ncohen@watson.ibm.com
  128.